using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.FIM
{
    using System;
    using System.Collections.Generic;

    [Table("FimPetition"), DataContract]
    public class Petition
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "PetitionId", ResourceType = typeof(Resources.PetitionsResource))]
        public int PetitionId { get; set; }

		[ForeignKey("MasBudgetSource")]
		[DataMember, Display(Name = "BgmSourceId", ResourceType = typeof(Resources.PetitionsResource))]
        public int BgSourceId { get; set; }

		[DataMember, Display(Name = "BgmYear", ResourceType = typeof(Resources.PetitionsResource))]
        public int BgYear { get; set; }

		[DataMember, Display(Name = "PetitionDate", ResourceType = typeof(Resources.PetitionsResource))]
        public Nullable<System.DateTime> PetitionDate { get; set; }

		[DataMember, Display(Name = "RefNo", ResourceType = typeof(Resources.PetitionsResource))]
        public string Code { get; set; }

		[DataMember, Display(Name = "DirectPay", ResourceType = typeof(Resources.PetitionsResource))]
        public bool DirectPay { get; set; }

        [ForeignKey("PetitionType")]
		[DataMember, Display(Name = "PetitionType", ResourceType = typeof(Resources.PetitionsResource))]
        public int PetitionTypeId { get; set; }

		[DataMember, Display(Name = "RealPetitionDate", ResourceType = typeof(Resources.PetitionsResource))]
        public Nullable<System.DateTime> RealPetitionDate { get; set; }

		[DataMember, Display(Name = "PetitionNo", ResourceType = typeof(Resources.PetitionsResource))]
        public string PetitionNo { get; set; }

        [ForeignKey("TransectionGroup")]
		[DataMember, Display(Name = "TranGrpId", ResourceType = typeof(Resources.PetitionsResource))]
        public Nullable<int> TranGrpId { get; set; }

		[DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.PetitionsResource))]
        public string Remarks { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.PetitionsResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.PetitionsResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.PetitionsResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.PetitionsResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.PetitionsResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        [DataMember]
        public virtual BGM.MasBudgetSource MasBudgetSource { get; set; }

        [DataMember]
        public virtual FimMasLookUp PetitionType { get; set; }

        [DataMember]
        public virtual ACM.TransectionGroup TransectionGroup { get; set; }
    }
}